/*
 * @Description:
 * @Version: 1.0
 * @Autor: haozhuang
 * @Date: 2020-05-07 15:56:52
 * @LastEditors: haozhuang
 * @LastEditTime: 2020-05-07 17:32:56
 */
import request from '../utils/request'
const projectId = sessionStorage.projectId
export function getProjectPage(pageSize, pageNo, name) {
  return request({
    url: '/project/get/page',
    method: 'get',
    qs: true,
    params: {
      pageSize,
      pageNo,
      name
    }
  })
}

// 根据id获取项目详情
export function getProjectInfo() {
  return request({
    url: '/project/get/' + projectId,
    method: 'post'
  })
}

// 删除项目
export function deleteProject(projectId) {
  return request({
    url: '/project/delete/' + projectId,
    method: 'get'
  })
}

// 删除项目
export function updateProject(data) {
  return request({
    url: '/project/update',
    method: 'post',
    data
  })
}

// 添加项目
export function addProject(data) {
  return request({
    url: '/project/add',
    method: 'post',
    data
  })
}
